package com.google.android.gms.internal;

import java.io.IOException;

public final class zzjd extends zzflm<zzjd> {
    public Integer zzbcv = null;
    private Integer zzbcw = null;
    private zzjf zzbcx = null;
    public zzjg zzbcy = null;
    private zzje[] zzbcz = zzje.zzhv();
    private zzjh zzbda = null;
    private zzjq zzbdb = null;
    private zzjp zzbdc = null;
    private zzjm zzbdd = null;
    private zzjn zzbde = null;
    private zzjw[] zzbdf = zzjw.zzhy();

    public zzjd() {
        this.zzpvl = null;
        this.zzpnr = -1;
    }

    /* access modifiers changed from: private */
    /* JADX WARNING: Can't fix incorrect switch cases order */
    /* renamed from: zzg */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final com.google.android.gms.internal.zzjd zza(com.google.android.gms.internal.zzflj r7) throws java.io.IOException {
        /*
            r6 = this;
        L_0x0000:
            int r0 = r7.zzcxx()
            r1 = 0
            switch(r0) {
                case 0: goto L_0x0140;
                case 56: goto L_0x010b;
                case 64: goto L_0x00f7;
                case 74: goto L_0x00e5;
                case 82: goto L_0x00d7;
                case 90: goto L_0x0097;
                case 98: goto L_0x0089;
                case 106: goto L_0x007b;
                case 114: goto L_0x006c;
                case 122: goto L_0x005d;
                case 130: goto L_0x004e;
                case 138: goto L_0x000f;
                default: goto L_0x0008;
            }
        L_0x0008:
            boolean r0 = super.zza(r7, r0)
            if (r0 != 0) goto L_0x0000
            return r6
        L_0x000f:
            r0 = 138(0x8a, float:1.93E-43)
            int r0 = com.google.android.gms.internal.zzflv.zzb(r7, r0)
            com.google.android.gms.internal.zzjw[] r2 = r6.zzbdf
            if (r2 != 0) goto L_0x001b
            r2 = r1
            goto L_0x001e
        L_0x001b:
            com.google.android.gms.internal.zzjw[] r2 = r6.zzbdf
            int r2 = r2.length
        L_0x001e:
            int r0 = r0 + r2
            com.google.android.gms.internal.zzjw[] r0 = new com.google.android.gms.internal.zzjw[r0]
            if (r2 == 0) goto L_0x0028
            com.google.android.gms.internal.zzjw[] r3 = r6.zzbdf
            java.lang.System.arraycopy(r3, r1, r0, r1, r2)
        L_0x0028:
            int r1 = r0.length
            int r1 = r1 + -1
            if (r2 >= r1) goto L_0x003f
            com.google.android.gms.internal.zzjw r1 = new com.google.android.gms.internal.zzjw
            r1.<init>()
            r0[r2] = r1
            r1 = r0[r2]
            r7.zza(r1)
            r7.zzcxx()
            int r2 = r2 + 1
            goto L_0x0028
        L_0x003f:
            com.google.android.gms.internal.zzjw r1 = new com.google.android.gms.internal.zzjw
            r1.<init>()
            r0[r2] = r1
            r1 = r0[r2]
            r7.zza(r1)
            r6.zzbdf = r0
            goto L_0x0000
        L_0x004e:
            com.google.android.gms.internal.zzjn r0 = r6.zzbde
            if (r0 != 0) goto L_0x0059
            com.google.android.gms.internal.zzjn r0 = new com.google.android.gms.internal.zzjn
            r0.<init>()
            r6.zzbde = r0
        L_0x0059:
            com.google.android.gms.internal.zzjn r0 = r6.zzbde
            goto L_0x00f2
        L_0x005d:
            com.google.android.gms.internal.zzjm r0 = r6.zzbdd
            if (r0 != 0) goto L_0x0068
            com.google.android.gms.internal.zzjm r0 = new com.google.android.gms.internal.zzjm
            r0.<init>()
            r6.zzbdd = r0
        L_0x0068:
            com.google.android.gms.internal.zzjm r0 = r6.zzbdd
            goto L_0x00f2
        L_0x006c:
            com.google.android.gms.internal.zzjp r0 = r6.zzbdc
            if (r0 != 0) goto L_0x0077
            com.google.android.gms.internal.zzjp r0 = new com.google.android.gms.internal.zzjp
            r0.<init>()
            r6.zzbdc = r0
        L_0x0077:
            com.google.android.gms.internal.zzjp r0 = r6.zzbdc
            goto L_0x00f2
        L_0x007b:
            com.google.android.gms.internal.zzjq r0 = r6.zzbdb
            if (r0 != 0) goto L_0x0086
            com.google.android.gms.internal.zzjq r0 = new com.google.android.gms.internal.zzjq
            r0.<init>()
            r6.zzbdb = r0
        L_0x0086:
            com.google.android.gms.internal.zzjq r0 = r6.zzbdb
            goto L_0x00f2
        L_0x0089:
            com.google.android.gms.internal.zzjh r0 = r6.zzbda
            if (r0 != 0) goto L_0x0094
            com.google.android.gms.internal.zzjh r0 = new com.google.android.gms.internal.zzjh
            r0.<init>()
            r6.zzbda = r0
        L_0x0094:
            com.google.android.gms.internal.zzjh r0 = r6.zzbda
            goto L_0x00f2
        L_0x0097:
            r0 = 90
            int r0 = com.google.android.gms.internal.zzflv.zzb(r7, r0)
            com.google.android.gms.internal.zzje[] r2 = r6.zzbcz
            if (r2 != 0) goto L_0x00a3
            r2 = r1
            goto L_0x00a6
        L_0x00a3:
            com.google.android.gms.internal.zzje[] r2 = r6.zzbcz
            int r2 = r2.length
        L_0x00a6:
            int r0 = r0 + r2
            com.google.android.gms.internal.zzje[] r0 = new com.google.android.gms.internal.zzje[r0]
            if (r2 == 0) goto L_0x00b0
            com.google.android.gms.internal.zzje[] r3 = r6.zzbcz
            java.lang.System.arraycopy(r3, r1, r0, r1, r2)
        L_0x00b0:
            int r1 = r0.length
            int r1 = r1 + -1
            if (r2 >= r1) goto L_0x00c7
            com.google.android.gms.internal.zzje r1 = new com.google.android.gms.internal.zzje
            r1.<init>()
            r0[r2] = r1
            r1 = r0[r2]
            r7.zza(r1)
            r7.zzcxx()
            int r2 = r2 + 1
            goto L_0x00b0
        L_0x00c7:
            com.google.android.gms.internal.zzje r1 = new com.google.android.gms.internal.zzje
            r1.<init>()
            r0[r2] = r1
            r1 = r0[r2]
            r7.zza(r1)
            r6.zzbcz = r0
            goto L_0x0000
        L_0x00d7:
            com.google.android.gms.internal.zzjg r0 = r6.zzbcy
            if (r0 != 0) goto L_0x00e2
            com.google.android.gms.internal.zzjg r0 = new com.google.android.gms.internal.zzjg
            r0.<init>()
            r6.zzbcy = r0
        L_0x00e2:
            com.google.android.gms.internal.zzjg r0 = r6.zzbcy
            goto L_0x00f2
        L_0x00e5:
            com.google.android.gms.internal.zzjf r0 = r6.zzbcx
            if (r0 != 0) goto L_0x00f0
            com.google.android.gms.internal.zzjf r0 = new com.google.android.gms.internal.zzjf
            r0.<init>()
            r6.zzbcx = r0
        L_0x00f0:
            com.google.android.gms.internal.zzjf r0 = r6.zzbcx
        L_0x00f2:
            r7.zza(r0)
            goto L_0x0000
        L_0x00f7:
            int r1 = r7.getPosition()
            int r2 = r7.zzcym()     // Catch:{ IllegalArgumentException -> 0x0138 }
            int r2 = com.google.android.gms.internal.zzjc.zzd(r2)     // Catch:{ IllegalArgumentException -> 0x0138 }
            java.lang.Integer r2 = java.lang.Integer.valueOf(r2)     // Catch:{ IllegalArgumentException -> 0x0138 }
            r6.zzbcw = r2     // Catch:{ IllegalArgumentException -> 0x0138 }
            goto L_0x0000
        L_0x010b:
            int r1 = r7.getPosition()
            int r2 = r7.zzcym()     // Catch:{ IllegalArgumentException -> 0x0138 }
            switch(r2) {
                case 0: goto L_0x0119;
                case 1: goto L_0x0119;
                case 2: goto L_0x0119;
                case 3: goto L_0x0119;
                case 4: goto L_0x0119;
                case 5: goto L_0x0119;
                case 6: goto L_0x0119;
                case 7: goto L_0x0119;
                case 8: goto L_0x0119;
                case 9: goto L_0x0119;
                default: goto L_0x0116;
            }     // Catch:{ IllegalArgumentException -> 0x0138 }
        L_0x0116:
            java.lang.IllegalArgumentException r3 = new java.lang.IllegalArgumentException     // Catch:{ IllegalArgumentException -> 0x0138 }
            goto L_0x0121
        L_0x0119:
            java.lang.Integer r2 = java.lang.Integer.valueOf(r2)     // Catch:{ IllegalArgumentException -> 0x0138 }
            r6.zzbcv = r2     // Catch:{ IllegalArgumentException -> 0x0138 }
            goto L_0x0000
        L_0x0121:
            r4 = 43
            java.lang.StringBuilder r5 = new java.lang.StringBuilder     // Catch:{ IllegalArgumentException -> 0x0138 }
            r5.<init>(r4)     // Catch:{ IllegalArgumentException -> 0x0138 }
            r5.append(r2)     // Catch:{ IllegalArgumentException -> 0x0138 }
            java.lang.String r2 = " is not a valid enum AdInitiater"
            r5.append(r2)     // Catch:{ IllegalArgumentException -> 0x0138 }
            java.lang.String r2 = r5.toString()     // Catch:{ IllegalArgumentException -> 0x0138 }
            r3.<init>(r2)     // Catch:{ IllegalArgumentException -> 0x0138 }
            throw r3     // Catch:{ IllegalArgumentException -> 0x0138 }
        L_0x0138:
            r7.zzmw(r1)
            r6.zza(r7, r0)
            goto L_0x0000
        L_0x0140:
            return r6
        */
        throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.zzjd.zza(com.google.android.gms.internal.zzflj):com.google.android.gms.internal.zzjd");
    }

    public final void zza(zzflk zzflk) throws IOException {
        if (this.zzbcv != null) {
            zzflk.zzad(7, this.zzbcv.intValue());
        }
        if (this.zzbcw != null) {
            zzflk.zzad(8, this.zzbcw.intValue());
        }
        if (this.zzbcx != null) {
            zzflk.zza(9, (zzfls) this.zzbcx);
        }
        if (this.zzbcy != null) {
            zzflk.zza(10, (zzfls) this.zzbcy);
        }
        if (this.zzbcz != null && this.zzbcz.length > 0) {
            for (zzje zzje : this.zzbcz) {
                if (zzje != null) {
                    zzflk.zza(11, (zzfls) zzje);
                }
            }
        }
        if (this.zzbda != null) {
            zzflk.zza(12, (zzfls) this.zzbda);
        }
        if (this.zzbdb != null) {
            zzflk.zza(13, (zzfls) this.zzbdb);
        }
        if (this.zzbdc != null) {
            zzflk.zza(14, (zzfls) this.zzbdc);
        }
        if (this.zzbdd != null) {
            zzflk.zza(15, (zzfls) this.zzbdd);
        }
        if (this.zzbde != null) {
            zzflk.zza(16, (zzfls) this.zzbde);
        }
        if (this.zzbdf != null && this.zzbdf.length > 0) {
            for (zzjw zzjw : this.zzbdf) {
                if (zzjw != null) {
                    zzflk.zza(17, (zzfls) zzjw);
                }
            }
        }
        super.zza(zzflk);
    }

    /* access modifiers changed from: protected */
    public final int zzq() {
        int zzq = super.zzq();
        if (this.zzbcv != null) {
            zzq += zzflk.zzag(7, this.zzbcv.intValue());
        }
        if (this.zzbcw != null) {
            zzq += zzflk.zzag(8, this.zzbcw.intValue());
        }
        if (this.zzbcx != null) {
            zzq += zzflk.zzb(9, (zzfls) this.zzbcx);
        }
        if (this.zzbcy != null) {
            zzq += zzflk.zzb(10, (zzfls) this.zzbcy);
        }
        if (this.zzbcz != null && this.zzbcz.length > 0) {
            int i = zzq;
            for (zzje zzje : this.zzbcz) {
                if (zzje != null) {
                    i += zzflk.zzb(11, (zzfls) zzje);
                }
            }
            zzq = i;
        }
        if (this.zzbda != null) {
            zzq += zzflk.zzb(12, (zzfls) this.zzbda);
        }
        if (this.zzbdb != null) {
            zzq += zzflk.zzb(13, (zzfls) this.zzbdb);
        }
        if (this.zzbdc != null) {
            zzq += zzflk.zzb(14, (zzfls) this.zzbdc);
        }
        if (this.zzbdd != null) {
            zzq += zzflk.zzb(15, (zzfls) this.zzbdd);
        }
        if (this.zzbde != null) {
            zzq += zzflk.zzb(16, (zzfls) this.zzbde);
        }
        if (this.zzbdf != null && this.zzbdf.length > 0) {
            for (zzjw zzjw : this.zzbdf) {
                if (zzjw != null) {
                    zzq += zzflk.zzb(17, (zzfls) zzjw);
                }
            }
        }
        return zzq;
    }
}
